<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>WarShip</title>
</head>

<body text="#FFFFFF" bgcolor="#000000" style="font-family: Verdana; font-size: 10pt" link="#00FFFF" vlink="#00FFFF" alink="#00FFFF">

<p><font size="3"><b>Programming in Solar Vengeance 5</b></font></p>
<p>You can custom program <a href="Scenarios.htm">Scenarios</a> and 
<a href="MultiPlayer%20Games.htm">Brains</a> to extend Solar Vengeance 5.&nbsp; 
You program these items as new classes in the C# programming language.&nbsp; 
Scenarios are classes that derive from a base class called &quot;Scenario&quot; and Brains 
are classes that derive from the &quot;Brain&quot; class.&nbsp; The base classes provide 
properties and methods that you leverage to develop the custom Scenarios, and 
the logic for how the Brain opponent plays the game.</p>
<p>The specific APIs of the Scenario and Brain classes will be covered in detail 
in their own topics, but this topic will focus on the general setup for 
programming in Solar Vengeance 5.</p>
<p><font color="#FFFF00"><b>How Solar Vengeance Loads Scenarios and Brains</b></font></p>
<p>Solar Vengeance looks for Scenarios in the &quot;Scenarios&quot; folder under its 
primary install folder, and Brains in the &quot;Brains&quot; folder.&nbsp; It looks for 
files with a &quot;.cs&quot; extension, which indicated C# source code.&nbsp; When you 
create a Scenario or Brain, just move or copy the source code file to the 
appropriate folder.&nbsp; The next time SV5 starts up it will load your file and 
attempt to compile it on-the-fly for inclusion in the game.</p>
<p><font color="#FFFF00"><b>Creating Source Code Files</b></font></p>
<p>Although you can use any text editor to create the source code file, such as 
Notepad, you can gain the most benefit by using a .NET development environment.&nbsp; 
Using a development environment will allow you to compile the source code to 
check for errors, and provides valuable time saving tools like Intellisense to 
make the job of programming a Scenario or Brain painless.</p>
<p>If you have access to
<a href="http://msdn.microsoft.com/en-us/vstudio/default.aspx">Microsoft Visual 
Studio</a>, you can use this environment to develop your new Scenarios and 
Brains.&nbsp; An alternative is the
<a href="http://www.icsharpcode.net/OpenSource/SD/">SharpDevelop</a> freeware 
development environment for .NET.</p>
<p><font color="#FFFF00"><b>Which .NET Framework?</b></font></p>
<p>Solar Vengeance 5 is currently build under version 2.0 of the Microsoft .NET 
Framework.&nbsp; You should develop your Scenarios and Brains using C# language 
features of .NET 2.0.&nbsp; Visual Studio 2005 and 2008 both allow you to target 
the .NET Framework 2.0.</p>
<p><font color="#FFFF00"><b>Adding a Reference</b></font></p>
<p>To build a Scenario or Brain in a development environment, you will need to 
add a reference to the Solar Vengeance engine in your project.&nbsp; Be sure to 
add the reference to the SCG.SolarVegneance.Engine assembly in your project.&nbsp; 
This .NET assembly contains the definition of the Scenario and the Brain classes 
that you need to access.</p>

</body>

</html>